Skip to content

[pull] main from vercel:main#313

Merged
pull[bot] merged 2 commits into
erickirt:mainfrom
vercel:main
Apr 29, 2026
Merged

[pull] main from vercel:main#313
pull[bot] merged 2 commits into
erickirt:mainfrom
vercel:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 29, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

karthikscale3 and others added 2 commits April 28, 2026 16:52
)

* fix(docs): highlight active top-bar nav item and drop duplicate keys

Match the current pathname (accounting for the hidden default locale)
and forward an `active` prop to the Radix NavigationMenuLink so the
selected top-bar item stays highlighted. Also remove module-level
`key` props from the intro Loading/Success/Error indicators — they
fired React's duplicate-key warning whenever two lines shared a state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* update saga cookbook docs with adaptation guidance and streaming example

Made-with: Cursor

* docs(cookbook): rewrite core recipes, dedupe, reorder sidebar

Pass over the cookbook focused on correctness, concrete examples, and
tighter information architecture.

Rewrites:
- Saga / Batching / Scheduling: concrete use cases (order fulfillment,
  CSV import, cancellable drip campaign); added "how it works" +
  "adapting" sections.
- Durable Agent / Human-in-the-Loop / Stop Workflow: fixed broken
  patterns (tool invocations don't stream before return; prepareStep
  flag checks never fire); canonical single example per page.
- AI SDK integration: refocused from DurableAgent showcase to
  streamText(); added multi-turn session pattern with durable stream
  slicing, ai-sdk.dev deep links, and a pitfalls section.
- Sandbox integration: rewrote around the real @vercel/sandbox SDK;
  flagship pattern is one workflow run = one persistent sandbox
  session that outlives the 5-hour VM cap via snapshot rotation.
- Chat SDK integration: full rewrite — previous page documented AI
  SDK's useChat, not chat-sdk.dev. New page covers durable chat
  sessions, Mermaid flowchart, and cross-SDK serialization.
- Publishing Libraries: swapped ASCII tree for Fumadocs <Files>
  (font-independent); corrected isomorphic guidance ("use workflow" /
  "use step" are safe no-ops when SWC plugin doesn't process them);
  added Mux AI and World ID adopter examples with canonical links.

Deletions (redundant or flawed):
- Fan-Out, Conditional Routing (covered by Batching / not a pattern).
- Tool Streaming, Tool Orchestration (covered by foundations/streaming
  and ai/defining-tools).
- Durable Objects (hook-in-loop bug; framing doesn't hold up).
- Custom Serialization, Isomorphic Packages (merged into
  foundations/serialization and publishing-libraries respectively).

Sidebar restructure:
- Reordered: Overview -> Agent Patterns -> Common Patterns ->
  Integrations -> Advanced (Agent Patterns leads since it drives most
  new-visitor traffic).
- Moved Child Workflows + Distributed Abort Controller from Common
  Patterns to Advanced (composition / coordination concerns, not
  common reliability recipes); permanent redirects added in
  next.config.ts.

Made-with: Cursor

* docs(cookbook): rename Agent Stop Signal → Agent Cancellation, migrate common patterns

The agent cancellation page now covers two named patterns — Hard
Cancellation via getRun(runId).cancel() and Stop Signal via a hook +
Promise.race — so the prior "Agent Stop Signal" title biased toward only
one of them. Rename to the broader noun phrase and update the intro,
description, and section heading to frame both approaches equally.

Also migrate all patterns from foundations/common-patterns into dedicated
cookbook recipes (timeouts, sequential-and-parallel, workflow-composition)
and remove the foundations page. Permanent redirects added for the prior
URLs (stop-workflow, agent-stop-signal, foundations/common-patterns) so
no inbound link breaks.

Made-with: Cursor

* docs(cookbook): fix CI typecheck failures on three snippets

- publishing-libraries.mdx: the second processPayment snippet uses
  getWorkflowRunId() defined in the prior block. Each block is type-checked
  independently, so add @skip-typecheck (matches the existing pattern in
  this file).
- ai-sdk.mdx: the "snapshot tailIndex first" pitfall is a fragment
  referencing probe / turnHook / run / text from the surrounding multi-turn
  pattern. Add @skip-typecheck.
- chat-sdk.mdx: the [platform] webhook route used Next.js 15 typegen
  (RouteContext<"/api/webhooks/[platform]">), which isn't part of the
  docs-typecheck environment. Switch to the manually-typed
  { params }: { params: Promise<{ platform: string }> } form — still fully
  supported by Next.js 15+ and doesn't depend on .next/types.

Made-with: Cursor

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nitro users can declare packages as externals via
`externals: { external: ['fsevents'] }` in `nitro.config.ts`. Previously
the workflow SDK's step/workflow/webhook bundles were built in isolation
and ignored that config, forcing users to either patch the Nitro adapter
or ship a custom builder (as in the 250MB bundle-size workaround gist).

Forward string entries from `nitro.options.externals.external` to the
builder's esbuild `external` option. Only string entries are forwarded
— RegExp and function matchers aren't supported by esbuild's
`external` API, so those are skipped.
@pull pull Bot locked and limited conversation to collaborators Apr 29, 2026
@pull pull Bot added the ⤵️ pull label Apr 29, 2026
@pull pull Bot merged commit cbecbaa into erickirt:main Apr 29, 2026
10 of 28 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants